package cn.dxj1016.lesson04;

import java.net.MalformedURLException;
import java.net.URL;
//http://localhost:8080/Jiao/SecurityFile.txt
public class URLDemo01 {
    public static void main(String[] args) throws MalformedURLException {
        URL url = new URL("http://localhost:8080/helloworld/index.jsp?username=kuangshen&password=123");
        System.out.println(url.getProtocol());
        System.out.println(url.getHost());
        System.out.println(url.getPort());
        System.out.println(url.getFile());
        System.out.println(url.getQuery());
    }
}
/*
localhost
8080
/helloworld/index.jsp?username=kuangshen&password=123
username=kuangshen&password=123
 */